GOTO Statements
GOTO statements transfer execution of the script to the beginning of the statement following the label associated with the GOTO. For example:
 
i,j : INTEGER;
IF (j MOD 2 = 0) THEN GOTO 100;
100: i:= i + 1;
If the condition (j MOD 2) = 0 evaluates to TRUE, execution in the script is transferred immediately to the beginning of the statement i:= i + 1, and the expression i:= i * 5 is never executed.
The general syntax for a GOTO statement is:
GOTO <label>;
GOTO statements have several cautions which must be observed whenever using them:
*
GOTO statements can only transfer execution within the same procedure, function, or main body of a script. They cannot be used to jump between procedures or between scripts.
*
The destination of a GOTO statement must always be the beginning of a statement.
*

Statements : GOTO Statements

Nemetschek NA
Phone: 410.290.5114
Fax: 410.290.8050